<?php
use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use yii\widgets\LinkPager;
use frontend\controllers\AboutController;
use common\models\member\Member;
use common\models\category\Category;
use common\models\articles\Articles;
use common\models\art\Art;
use common\models\Fenhuigrade\Fenhuigrade;

    $fenhui = Fenhuigrade::find()->where(['status' => Fenhuigrade::STATUS_ACTIVE])->asArray()->limit(6)->all();
    $weiyuan = Articles::find()->where(['category_id' => 16, 'status' => Articles::STATUS_ACTIVE])->asArray()->limit(3)->all();
    $pinpai = Articles::find()->where(['category_id'=>23, 'status' => Articles::STATUS_ACTIVE])->asArray()->limit(9)->all();


    $controllerID = Yii::$app->controller->id;
    $actionID = Yii::$app->controller->action->id;
?>
    <style>
        .divtoneulimg{
            margin-right: -33px;
        }
        .divtoneulimg li{
            margin-right: 36px;
        }
    </style>

    <div class="content">
        <div class="w1200 clearFloat mb50">
            <h3 class="abouth3">当前位置：<a href="">首页</a> > <a href="<?= yii\helpers\Url::to([$parentinfo['type'], 'id'=>$parentid]);?>"><?= $parenttitle;?></a> > <a><?= $title;?></a></h3>
            <div class="clearFloat">
                <div class="jjleft floatLeft">
                    <div class="clearFloat">
                        <h3 class="jjtitle"><?= $parenttitle?></h3>
                        <ul class="jjul">
                            <?php foreach($childcat as $t){ ?>
                            <li<?php if(("$controllerID".'/'."$actionID") == $t['type']){echo ' class="jjactive"';} ?>>
                                <a href="<?= yii\helpers\Url::to([$t['type'], 'id' => $id]); ?>">
                                    <?php echo $t['name']; ?>
                                </a>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                </div>
                <div class="jjmiddle floatLeft">
                    <div class="clearFloat">
                        <h3 class="jjmh3">
                            <?= $article['company'];?>
                        </h3>
                        <div class="bshare">
                            <span class="fbtime">发布时间：<?= date('Y-m-d', $article['created_at']);?></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <span style="display: inline-flex;">分享到 : <div style="margin-left: 10px;" class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script></script></span>
                        </div>
                        <div class="jjmip">
                            <?= $article['content'];?>
                        </div>
                    </div>
                </div>
                <div class="jjright floatRight">
                    <div class="clearFloat">
                        <h3 class="indexh3"><span>协会机构 </span></h3>
                        <ul class="divtoneulimg clearFloat">
                        <?php foreach($fenhui as $vo){ ?>
                            <li>
                                <a href="<?= yii\helpers\Url::to(['content/fenhui','id' => $vo['id']]); ?>">
                                    <img src="/upload/<?= json_decode($vo['label_img'], true)['newname'];?>" alt="" width="72" height="72">
                                    <span><?= mb_substr(strip_tags($vo['name']),0,5,'utf-8'); ?><?php if(strlen($vo['name']) > 16) { echo '...'; } ?></span>
                                </a>
                            </li>
                        <?php } ?>
                        </ul>
                    </div>
                    <div class="clearFloat mt35">
                        <h3 class="indexh3"><span>分支机构</span></h3>
                        <ul class="fzdiv mt35">
                            <?php foreach($weiyuan as $t) { ?>
                            <li>
                                <a href="<?= yii\helpers\Url::to(['list/newscontent','id' => $t['id']]); ?>">
                                    <?= mb_substr(strip_tags($t['title']),0,11,'utf-8'); ?><?php if(strlen($t['title']) > 34) { echo '...'; } ?>
                                </a>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                    <div class="clearFloat mt35">
                        <h3 class="indexh3"><span>品牌建设</span></h3>
                        <ul class="divtoneul">
                           <?php foreach($pinpai as $vo){ ?>
                            <li>
                                <a href="<?= yii\helpers\Url::to(['list/newscontent','id' => $vo['id']]); ?>"><?= mb_substr(strip_tags($vo['title']),0,22,'utf-8'); ?><?php if(strlen($vo['title']) > 67) { echo '...'; } ?></a>
                            </li>
                          <?php } ?>
                        </ul>
                    </div>                
                </div>
                
            </div>
        </div>
    </div>